[POC] Segment analytics integration Polls /Metrics (Prometheus Endpoint) every 5 hours#26
Draft
cshiels-ie wants to merge 5 commits intoansible:mainfrom
Draft
[POC] Segment analytics integration Polls /Metrics (Prometheus Endpoint) every 5 hours#26cshiels-ie wants to merge 5 commits intoansible:mainfrom
cshiels-ie wants to merge 5 commits intoansible:mainfrom
Conversation
- Updated `aap-mcp.sample.yaml` to include configuration options for Prometheus metrics and Segment analytics. - Added new `MetricsService` class for collecting and exposing metrics. - Implemented `AnalyticsService` for tracking tool usage and service events with anonymized data. - Enhanced `ToolLogger` to record metrics and analytics during tool execution. - Introduced `/metrics` endpoint for Prometheus scraping. - Updated `index.ts` to initialize analytics and metrics services based on configuration.
Contributor
|
This is really cool. I believe we can merge the Prometheus support fairly quickly. Could you prepare a new PR with just this part? Could you also record which category is used? |
|
@cshiels-ie please rebase this after your prometheus PR? |
|
@jameswnl can you take a look at this PR? |
decbe30 to
dd13cde
Compare
- Added configuration options for enabling analytics reporting and specifying the Segment write key in the YAML configuration file. - Updated the Segment analytics-node dependency from version 2.1.2 to 2.3.0. - Improved logging and error handling in the analytics service. - Refactored code for better readability and maintainability, including consistent formatting and comments. - Introduced a helper function for boolean configuration with environment variable overrides.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

aap-mcp.sample.yamlto include configuration options for Prometheus metrics and Segment analytics.AnalyticsServicefor tracking tool usage and service events with anonymized data.index.tsto initialize analytics and metrics services based on configuration.Sends an initial message and then checks every 5 hours and updates the metrics to Segment.com